A bag is useful when an algorithm calls for a structure where order is not important -- e.g. perhaps a problem needs a structure only for the purpose of determining if it "contains" matches.
The order of elements in a bag does not need to be random. It may, in fact, be ordered.
When we say "order is not important" we simply mean that the object user of a bag should not expect any certain order of elements. The actual order depends how it is implemented (hidden under the hood).
A coder may decide to implement it as ordered or unordered.
(Hardcopy Book) Data Structures and Abstractions (Carrano and Henry) -- Chapters "Bag Implementation That Use Arrays" and "Bag Implementation That Links Data"